home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / dev / exabyte.h < prev    next >
C/C++ Source or Header  |  1991-06-28  |  6KB  |  147 lines

  1. /*
  2.  * exabyte.h --
  3.  *
  4.  *    Declarations for Exabyte tape drives.
  5.  *
  6.  * Copyright 1991 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that this copyright
  10.  * notice appears in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/lib/forms/RCS/proto.h,v 1.7 91/02/09 13:24:52 ouster Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _EXABYTE
  19. #define _EXABYTE
  20.  
  21. #include <sys/scsi.h>
  22. /*
  23.  * Sense data for exb8200.
  24.  */
  25.  
  26. typedef struct {
  27.     ScsiClass7Sense    extSense;    /* 8 Bytes */
  28.     unsigned char pad8;            /* Reserved */
  29.     unsigned char pad;            /* Reserved */
  30.     unsigned char pad10;        /* Reserved */
  31.     unsigned char pad11;        /* Reserved */
  32.     /*
  33.      * SCSI 2 support.
  34.      */
  35.     unsigned char senseCode;        /* 0x4 if sense key is NOT_READY */
  36.     unsigned char senseCodeQualifier;    /* 00 - volume not mounted.
  37.                      * 01 - rewinding or loading */
  38.     unsigned char pad14;        /* Reserved */
  39.     unsigned char pad15;        /* Reserved */
  40.     unsigned char highErrorCnt;        /* High byte of error count */
  41.     unsigned char midErrorCnt;        /* Middle byte of error count */
  42.     unsigned char lowErrorCnt;        /* Low byte of error count */
  43.     /*
  44.      * Error bits that are command dependent.  0 is ok, 1 means error.
  45.      * These are defined on pages 37-38 of the User Manual, Rev.03
  46.      */
  47.     unsigned char PF        :1;    /* Power failure */
  48.     unsigned char BPE        :1;    /* SCSI Bus Parity Error */
  49.     unsigned char FPE        :1;    /* Formatted buffer parity error */
  50.     unsigned char ME        :1;    /* Media error */
  51.     unsigned char ECO        :1;    /* Error counter overflow */
  52.     unsigned char TME        :1;    /* Tape motion error */
  53.     unsigned char TNP        :1;    /* Tape not present */
  54.     unsigned char BOT        :1;    /* Set when tape is at BOT */
  55.  
  56.     unsigned char XFR        :1;    /* Transfer Abort Error */
  57.     unsigned char TMD        :1;    /* Tape Mark Detect Error */
  58.     unsigned char WP        :1;    /* Write Protect */
  59.     unsigned char FMKE        :1;    /* File Mark Error */
  60.     unsigned char URE        :1;    /* Data flow underrun. Media error. */
  61.     unsigned char WE1        :1;    /* Max write retries attempted */
  62.     unsigned char SSE        :1;    /* Servo System error.  Catastrophic */
  63.     unsigned char FE        :1;    /* Formatter error.  Catastrophic */
  64.  
  65.     unsigned char pad21        :6;    /* Reserved */
  66.     unsigned char WSEB        :1;    /* Write Splice Error, hit blank tape */
  67.     unsigned char WSEO        :1;    /* Write Splice Error, overshoot */
  68.  
  69.     unsigned char pad22;        /* Reserved */
  70.     unsigned char highRemainingTape;    /* High byte of remaining tape len */
  71.     unsigned char midRemainingTape;    /* Middle byte of remaining tape len */
  72.     unsigned char lowRemainingTape;    /* Low byte of remaining tape len */
  73.  
  74. } Exb8200Sense;                
  75.  
  76. typedef struct {
  77.     ScsiClass7Sense    extSense;    /* 8 Bytes */
  78.     unsigned char pad8;            /* Reserved */
  79.     unsigned char pad;            /* Reserved */
  80.     unsigned char pad10;        /* Reserved */
  81.     unsigned char underrun;        /* Underrun/overrun counter */
  82.     /*
  83.      * SCSI 2 support.
  84.      */
  85.     unsigned char senseCode;        /* 0x4 if sense key is NOT_READY */
  86.     unsigned char senseCodeQualifier;    /* 00 - volume not mounted.
  87.                      * 01 - rewinding or loading */
  88.     unsigned char pad14;        /* Reserved */
  89.     unsigned char pad15;        /* Reserved */
  90.     unsigned char highErrorCnt;        /* High byte of error count */
  91.     unsigned char midErrorCnt;        /* Middle byte of error count */
  92.     unsigned char lowErrorCnt;        /* Low byte of error count */
  93.     /*
  94.      * Error bits that are command dependent.  0 is ok, 1 means error.
  95.      * These are defined on pages 37-38 of the User Manual, Rev.03
  96.      */
  97.     unsigned char PF        :1;    /* Power failure */
  98.     unsigned char BPE        :1;    /* SCSI Bus Parity Error */
  99.     unsigned char FPE        :1;    /* Formatted buffer parity error */
  100.     unsigned char ME        :1;    /* Media error */
  101.     unsigned char ECO        :1;    /* Error counter overflow */
  102.     unsigned char TME        :1;    /* Tape motion error */
  103.     unsigned char TNP        :1;    /* Tape not present */
  104.     unsigned char BOT        :1;    /* Set when tape is at BOT */
  105.  
  106.     unsigned char XFR        :1;    /* Transfer Abort Error */
  107.     unsigned char TMD        :1;    /* Tape Mark Detect Error */
  108.     unsigned char WP        :1;    /* Write Protect */
  109.     unsigned char FMKE        :1;    /* File Mark Error */
  110.     unsigned char URE        :1;    /* Data flow underrun. Media error. */
  111.     unsigned char WE1        :1;    /* Max write retries attempted */
  112.     unsigned char SSE        :1;    /* Servo System error.  Catastrophic */
  113.     unsigned char FE        :1;    /* Formatter error.  Catastrophic */
  114.  
  115.     unsigned char pad21        :6;    /* Reserved */
  116.     unsigned char WSEB        :1;    /* Write Splice Error, hit blank tape */
  117.     unsigned char WSEO        :1;    /* Write Splice Error, overshoot */
  118.  
  119.     unsigned char pad22;        /* Reserved */
  120.     unsigned char highRemainingTape;    /* High byte of remaining tape len */
  121.     unsigned char midRemainingTape;    /* Middle byte of remaining tape len */
  122.     unsigned char lowRemainingTape;    /* Low byte of remaining tape len */
  123.  
  124.     unsigned char trackingRetry;    /* Tracking retry counter. */
  125.     unsigned char readWriteRetry;    /* Read/Write retry counter. */
  126.     unsigned char faultCode;        /* Fault symptom code. */
  127. } Exb8500Sense;                
  128.  
  129. /*
  130.  * Values for the drive-specific fields in Dev_TapeStatus.
  131.  */
  132.  
  133. /*
  134.  * bufferedMode
  135.  */
  136.  
  137. #define DEV_EXB8500_UNBUFFERED_MODE    0x00     /* Data is unbuffered. */
  138. #define DEV_EXB8500_BUFFERED_MODE    0x01    /* Data is buffered. */
  139.  
  140. /*
  141.  * Density
  142.  */
  143. #define DEV_EXB8500_8200_MODE        0x14    /* Exb8200 mode. */
  144.  
  145. #endif /* _EXABYTE */
  146.  
  147.